import { getWeb3 } from './provider'

export const getWeb3Contract = (abi, address, web3) => {
  if (!web3) {
    web3 = getWeb3()
  }
  return new web3.eth.Contract(abi, address)
}

export const getWeb3ContractFactory = (abi, web3) => {
  if (!web3) {
    web3 = getWeb3()
  }
  return new web3.eth.Contract(abi)
}
